#include "DXUT.h"
#include "Road.h"


CRoad::CRoad(const TCHAR *resName,const TCHAR *szFile)
{
	pRoadMesh=new CMesh(resName,szFile);
	Singleton<CGraphicsResourceManager>::Instance()->Add((void **)&pRoadMesh);
	pRoadMeshInstance=new CMeshInstance(pRoadMesh);
	
}


CRoad::~CRoad(void)
{
}

void CRoad::setRoadScale(D3DXVECTOR3* scale)
{
	r_scale = *scale;
	pRoadMeshInstance->SetScale(r_scale);
}

void CRoad::setPosition(D3DXVECTOR3 r_pos)
{
	pRoadMeshInstance->SetPosition(r_pos);
}

void CRoad::setRoadRoate(D3DXVECTOR3* r_Roate)
{
	pRoadMeshInstance->SetRotation(*r_Roate);
}
void CRoad::Render(float fElapsedTime)
{
	pRoadMeshInstance->OnD3D9FrameRender(fElapsedTime);
}